/***********************************************
/gen auto by zuitools
***********************************************/
#ifndef __SETACTIVITY_H__
#define __SETACTIVITY_H__


#include "app/Activity.h"
#include "entry/EasyUIContext.h"

#include "uart/ProtocolData.h"
#include "uart/ProtocolParser.h"

#include "utils/Log.h"
#include "control/ZKDigitalClock.h"
#include "control/ZKButton.h"
#include "control/ZKCircleBar.h"
#include "control/ZKDiagram.h"
#include "control/ZKListView.h"
#include "control/ZKPointer.h"
#include "control/ZKQRCode.h"
#include "control/ZKTextView.h"
#include "control/ZKSeekBar.h"
#include "control/ZKEditText.h"
#include "control/ZKVideoView.h"
#include "window/ZKSlideWindow.h"

/*TAG:Macro宏ID*/
#define ID_SET_TextNewMax    50046
#define ID_SET_locktime    50040
#define ID_SET_TextView23    50038
#define ID_SET_Button10    20045
#define ID_SET_Button9    20044
#define ID_SET_Button8    20043
#define ID_SET_TextView30    50045
#define ID_SET_TextView29    50044
#define ID_SET_TextView27    50043
#define ID_SET_TextView26    50041
#define ID_SET_lockBar    91004
#define ID_SET_lockSwitch    20042
#define ID_SET_TextView22    50037
#define ID_SET_Window4    110013
#define ID_SET_lockWnd    110012
#define ID_SET_soundSwitch    20041
#define ID_SET_Name1    50036
#define ID_SET_TextView28    50042
#define ID_SET_Button_back    20040
#define ID_SET_Button6    20039
#define ID_SET_Button5    20022
#define ID_SET_Window3    110011
#define ID_SET_soundWnd    110010
#define ID_SET_VersionTip0    50026
#define ID_SET_UpdateOkButton    20021
#define ID_SET_hideNew    20020
#define ID_SET_VersionTipNew    50035
#define ID_SET_TextView21    50034
#define ID_SET_NewVersionWnd    110005
#define ID_SET_hide2    20024
#define ID_SET_reset    20023
#define ID_SET_TextViewType    50032
#define ID_SET_ResfFctSettings    110002
#define ID_SET_TextupdateValue    50024
#define ID_SET_TextViewUpdateMessage    50025
#define ID_SET_VersionTip1    50029
#define ID_SET_checkupdate    20038
#define ID_SET_hide1    20037
#define ID_SET_UpdateWnd    110009
#define ID_SET_boiling_back    20015
#define ID_SET_TempFeiDian    50033
#define ID_SET_TextView24    50031
#define ID_SET_TextView20    50030
#define ID_SET_textName    50028
#define ID_SET_line    50027
#define ID_SET_Window1    110004
#define ID_SET_OtaBar    91002
#define ID_SET_OtaWnd    110003
#define ID_SET_Boilingpoint    20013
#define ID_SET_BoilingYes    20011
#define ID_SET_TextView19    50023
#define ID_SET_SeekBar2    91003
#define ID_SET_BoilingpointWnd    110008
#define ID_SET_Button3    20018
#define ID_SET_Button28    20028
#define ID_SET_Button33    20033
#define ID_SET_Button29    20029
#define ID_SET_TextView18    50022
#define ID_SET_Button34    20034
#define ID_SET_TextView17    50021
#define ID_SET_Button32    20032
#define ID_SET_Button26    20026
#define ID_SET_Button27    20027
#define ID_SET_Button25    20025
#define ID_SET_Button35    20035
#define ID_SET_Button31    20031
#define ID_SET_Button30    20030
#define ID_SET_Button36    20036
#define ID_SET_FactoryPassWnd    110007
#define ID_SET_TextView16    50020
#define ID_SET_TextView15    50019
#define ID_SET_Button2    20017
#define ID_SET_TextView14    50017
#define ID_SET_Button1    20016
#define ID_SET_TextView13    50016
#define ID_SET_FactoryModeWnd    110006
#define ID_SET_TextViewBrigValue    50015
#define ID_SET_TextView12    50014
#define ID_SET_setWnd    110001
#define ID_SET_ButtonStartUpdate    20014
#define ID_SET_Version    50012
#define ID_SET_TextView32    50039
#define ID_SET_VersionTip    50011
#define ID_SET_McuVersion    50018
#define ID_SET_Button4    20019
#define ID_SET_lightBar    91001
#define ID_SET_time    20012
#define ID_SET_wifi    20010
#define ID_SET_touchSound    20008
#define ID_SET_light    20007
#define ID_SET_lock    20006
#define ID_SET_waterMode    20005
#define ID_SET_boilingPoint    20004
#define ID_SET_filter    20003
#define ID_SET_restore    20002
#define ID_SET_iceWater    20001
#define ID_SET_iceCake    20009
#define ID_SET_TextView5    50013
#define ID_SET_TextView1    50001
#define ID_SET_TextView2    50002
#define ID_SET_TextView3    50003
#define ID_SET_TextView4    50004
#define ID_SET_TextView6    50005
#define ID_SET_TextView7    50006
#define ID_SET_TextView8    50007
#define ID_SET_TextView9    50008
#define ID_SET_TextView10    50009
#define ID_SET_TextView11    50010
/*TAG:Macro宏ID END*/

class setActivity : public Activity, 
                     public ZKSeekBar::ISeekBarChangeListener, 
                     public ZKListView::IItemClickListener,
                     public ZKListView::AbsListAdapter,
                     public ZKSlideWindow::ISlideItemClickListener,
                     public EasyUIContext::ITouchListener,
                     public ZKEditText::ITextChangeListener,
                     public ZKVideoView::IVideoPlayerMessageListener
{
public:
    setActivity();
    virtual ~setActivity();

    /**
     * 注册定时器
     */
	void registerUserTimer(int id, int time);
	/**
	 * 取消定时器
	 */
	void unregisterUserTimer(int id);
	/**
	 * 重置定时器
	 */
	void resetUserTimer(int id, int time);

protected:
    /*TAG:PROTECTED_FUNCTION*/
    virtual const char* getAppName() const;
    virtual void onCreate();
    virtual void onClick(ZKBase *pBase);
    virtual void onResume();
    virtual void onPause();
    virtual void onIntent(const Intent *intentPtr);
    virtual bool onTimer(int id);

    virtual void onProgressChanged(ZKSeekBar *pSeekBar, int progress);

    virtual int getListItemCount(const ZKListView *pListView) const;
    virtual void obtainListItemData(ZKListView *pListView, ZKListView::ZKListItem *pListItem, int index);
    virtual void onItemClick(ZKListView *pListView, int index, int subItemIndex);

    virtual void onSlideItemClick(ZKSlideWindow *pSlideWindow, int index);

    virtual bool onTouchEvent(const MotionEvent &ev);

    virtual void onTextChanged(ZKTextView *pTextView, const string &text);

    void rigesterActivityTimer();

    virtual void onVideoPlayerMessage(ZKVideoView *pVideoView, int msg);
    void videoLoopPlayback(ZKVideoView *pVideoView, int msg, size_t callbackTabIndex);
    void startVideoLoopPlayback();
    void stopVideoLoopPlayback();
    bool parseVideoFileList(const char *pFileListPath, std::vector<string>& mediaFileList);
    int removeCharFromString(string& nString, char c);


private:
    /*TAG:PRIVATE_VARIABLE*/
    int mVideoLoopIndex;
    int mVideoLoopErrorCount;

};

#endif